package com.xt.base.dao.hibernate;

import org.hibernate.Query;


public class DefaultBaseDao extends BaseDaoHibernate{
	private static final long serialVersionUID = -2967477855917206695L;
	private static DefaultBaseDao _this ;
	
	public long count(String clazz){
		return (Long)getSession().createQuery(
				"select count(*)  from " + clazz).uniqueResult();
	}
	 
	public Query getQuery(String query){
		return getSession().createQuery(query);
	}
	
	private DefaultBaseDao(){
		_this = this ;
	}
	
	public static DefaultBaseDao getInstance(){
		 
		return _this ;
	}
	 
}
